package org.jeecg.modules.wms.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.wms.entity.FinishedGoodsInboundDetail;
import org.jeecg.modules.wms.mapper.FinishedGoodsInboundDetailMapper;
import org.jeecg.modules.wms.service.IFinishedGoodsInboundDetailService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 成品入库明细Service实现类
 */
@Slf4j
@Service
public class FinishedGoodsInboundDetailServiceImpl extends ServiceImpl<FinishedGoodsInboundDetailMapper, FinishedGoodsInboundDetail> 
        implements IFinishedGoodsInboundDetailService {

    @Override
    public List<FinishedGoodsInboundDetail> getByInboundId(String inboundId) {
        LambdaQueryWrapper<FinishedGoodsInboundDetail> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(FinishedGoodsInboundDetail::getInboundId, inboundId);
        return this.list(wrapper);
    }

    @Override
    public List<FinishedGoodsInboundDetail> getByOrderDetailId(String orderDetailId) {
        LambdaQueryWrapper<FinishedGoodsInboundDetail> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(FinishedGoodsInboundDetail::getOrderDetailId, orderDetailId);
        return this.list(wrapper);
    }
}
